﻿@model OJS.Web.ViewModels.Account.ExternalLoginConfirmationViewModel
@using Resource = Resources.Account.Views.ExternalLoginConfirmation

@{
    ViewBag.Title = Resource.Register;
}

<ol class="breadcrumb">
    <li><a href="/">Начало</a></li>
    <li class="active">@ViewBag.Title</li>
</ol>

<h2>@ViewBag.Title</h2>

@if (ViewBag.LoginProvider != null)
{
    <h3>@string.Format(Resource.Link_account, ViewBag.LoginProvider)</h3>
}

@Html.ValidationSummary()

@using (Html.BeginForm(
                    "ExternalLoginConfirmation",
                    "Account",
                    new { ViewBag.ReturnUrl },
                    FormMethod.Post,
                    new { @class = "form-horizontal", role = "form" }))
{
    @Html.AntiForgeryToken()
    <hr />
    @Html.HiddenFor(x => x.Email)
    @Html.ValidationSummary(true)
    if (ViewBag.LoginProvider != null)
    {
        <p class="text-info">
            @Resource.Successfully_logged_in <strong>@ViewBag.LoginProvider</strong>.
            @Resource.Enter_username_and_register
        </p>
    }

    <div class="form-group">
        @Html.LabelFor(m => m.UserName, new { @class = "col-md-2 control-label" })
        <div class="col-md-5">
            @Html.TextBoxFor(m => m.UserName, new { @class = "form-control" })
            @Html.ValidationMessageFor(m => m.UserName)
        </div>
    </div>
    <div class="form-group">
        <div class="col-md-offset-2 col-md-5">
            <input type="submit" class="btn btn-default" value="@Resource.Register" />
        </div>
    </div>
}

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
